<script>
    import Vue from 'vue';
    import VueRouter from 'vue-router';
    Vue.use(VueRouter);
</script>
<div id="app">
        <nav class="navbar navbar-inverse">
        <div class="container">
        <div class="collapse navbar-collapse">
        <ul class="nav navbar-nav">
        <li>
      <!—使用 v-link 指令，path 的值对应跳转的路径，即 #!/home -->
      <a v-link="{ path : '/home'}">Home</a>
        </li>
        <li>
      <a v-link="{ path : '/list'}">List</a>
        </li>
        </ul>
        </div>
        </div>
        </nav>
        <div class="container">
        <!—路由切换组件 template 插入的位置 -->
        <router-view></router-view>
        </div>
</div>
<script>
    var vm=new Vue({
        el:'#app'
    });
</script>